package com.distribute.framework.model;

import com.distribute.framework.core.web.helper.Utils;
import java.lang.reflect.Field;
import java.util.Date; 
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;

import javax.annotation.Resource;

import com.distribute.framework.core.web.util.Page;
import com.distribute.framework.core.lang.*; 
import com.distribute.framework.core.web.helper.WebHelper.LzMap;
import com.distribute.framework.core.util.Function;
import com.distribute.framework.core.util.IbatisMap;
import com.distribute.framework.config.*;
import com.distribute.framework.plugin.*;

@namespace("partner/income")
public @caption("合伙人收益") @database(DatabaseNames.distribute_sys) @source("distribute_sys") @table("tb_partner_income") class TbPartnerIncome implements java.io.Serializable
{
	private static final long serialVersionUID = 1l;
		
	
		
	private @caption("编号") @column("tbpi_id")    @primary  @notnull  @note("  ") Long tbpiId;// 主键 非空     
			
 			
 			
 		
	
		
	private @caption("品牌") @column("tbpi_brand")      @relate("$tbpiBrand") @RelateClass(Merchant.class)  @note("  ") Long tbpiBrand;//     
			
 	private transient Merchant $tbpiBrand;//关联对象[品牌信息]
 			
 			
 			
 		
	
		
	private transient @caption("会员名称") @column("nick_name") @like     @note("  ") String nickName;//     
			
 			
 			
 		
	
		
	private @caption("会员") @column("tbpi_member")   @hidden    @relate("$tbpiMember") @RelateClass(Member.class)  @note("  ") Long tbpiMember;//     
			
 	private transient Member $tbpiMember;//关联对象[会员信息]
 			
 			
 			
 		
	
		
	private @caption("订单号") @column("tbpi_order_no") @like     @note("  ") String tbpiOrderNo;//     
			
 			
 			
 		
	
		
	private @caption("订单类型") @column("tbpi_order_type")      @note(" 1:直接购买 2:余额提货订单  ") Short tbpiOrderType;// 1:直接购买 2:余额提货订单     
			
 			
 			
 		
	
		
	private @caption("合伙人昵称") @column("tbpi_partner_nickname") @like     @note("  ") String tbpiPartnerNickname;//     
			
 			
 			
 		
	
		
	private @caption("下单人头像") @column("tbpi_head")   @hidden    @note("  ") String tbpiHead;//     
			
 			
 			
 		
	
		
	private @caption("下单人昵称") @column("tbpi_nickname") @like     @note("  ") String tbpiNickname;//     
			
 			
 			
 		
	
		
	private @caption("街道") @column("tbpi_street") @like     @note("  ") String tbpiStreet;//     
			
 			
 			
 		
	
		
	private @caption("省市区") @column("tbpi_city") @like     @note("  ") String tbpiCity;//     
			
 			
 			
 		
	
		
	private @caption("下单时间") @column("tbpi_order_time")      @note("  ") Date tbpiOrderTime;//     
			
 			
 			
 		
	
		
	private @caption("收益金额") @column("tbpi_money")      @note("  ") Double tbpiMoney;//     
			
 			
 			
 		
	
	 
	//默认构造函数
	public TbPartnerIncome(){ 
	
	}
	
	//主键构造函数
	public TbPartnerIncome(Long id){
		this.tbpiId = id;
	}
	
	/**所有字段构造函数 
	 TbPartnerIncome(
	 	Utils.getLong("brand")//品牌
	 	,Utils.getLong("member")//会员
	 	,Utils.getString("orderNo")//订单号
	 	,Utils.getShort("orderType")//订单类型
	 	,Utils.getString("partnerNickname")//合伙人昵称
	 	,Utils.getString("head")//下单人头像
	 	,Utils.getString("nickname")//下单人昵称
	 	,Utils.getString("street")//街道
	 	,Utils.getString("city")//省市区
	 	,Utils.getDate("orderTime")//下单时间
	 	,Utils.getDouble("money")//收益金额
	 )
	**/
	public TbPartnerIncome(Long tbpiBrand,Long tbpiMember,String tbpiOrderNo,Short tbpiOrderType,String tbpiPartnerNickname,String tbpiHead,String tbpiNickname,String tbpiStreet,String tbpiCity,Date tbpiOrderTime,Double tbpiMoney){
		
			
			
		this.tbpiBrand=tbpiBrand;
		
			
			
		this.tbpiMember=tbpiMember;
		
			
		this.tbpiOrderNo=tbpiOrderNo;
		
			
		this.tbpiOrderType=tbpiOrderType;
		
			
		this.tbpiPartnerNickname=tbpiPartnerNickname;
		
			
		this.tbpiHead=tbpiHead;
		
			
		this.tbpiNickname=tbpiNickname;
		
			
		this.tbpiStreet=tbpiStreet;
		
			
		this.tbpiCity=tbpiCity;
		
			
		this.tbpiOrderTime=tbpiOrderTime;
		
			
		this.tbpiMoney=tbpiMoney;
		
	}
	
	//设置非空字段
	public TbPartnerIncome setNotNull(){
		
			
			
			
			
			
			
			
			
			
			
			
			
			
		return this;
	}
	
	
		
	/** 编号 [非空]       **/
	public TbPartnerIncome tbpiId(Long tbpiId){
		this.tbpiId = tbpiId;
		this.setSeted(F.tbpiId);
		return this;
	}
	
		
	/** 品牌  [Merchant]      **/
	public TbPartnerIncome tbpiBrand(Long tbpiBrand){
		this.tbpiBrand = tbpiBrand;
		this.setSeted(F.tbpiBrand);
		return this;
	}
	
		
		
	/** 会员  [Member]      **/
	public TbPartnerIncome tbpiMember(Long tbpiMember){
		this.tbpiMember = tbpiMember;
		this.setSeted(F.tbpiMember);
		return this;
	}
	
		
	/** 订单号        **/
	public TbPartnerIncome tbpiOrderNo(String tbpiOrderNo){
		this.tbpiOrderNo = tbpiOrderNo;
		this.setSeted(F.tbpiOrderNo);
		return this;
	}
	
		
	/** 订单类型    1:直接购买 2:余额提货订单     **/
	public TbPartnerIncome tbpiOrderType(Short tbpiOrderType){
		this.tbpiOrderType = tbpiOrderType;
		this.setSeted(F.tbpiOrderType);
		return this;
	}
	
		
	/** 合伙人昵称        **/
	public TbPartnerIncome tbpiPartnerNickname(String tbpiPartnerNickname){
		this.tbpiPartnerNickname = tbpiPartnerNickname;
		this.setSeted(F.tbpiPartnerNickname);
		return this;
	}
	
		
	/** 下单人头像        **/
	public TbPartnerIncome tbpiHead(String tbpiHead){
		this.tbpiHead = tbpiHead;
		this.setSeted(F.tbpiHead);
		return this;
	}
	
		
	/** 下单人昵称        **/
	public TbPartnerIncome tbpiNickname(String tbpiNickname){
		this.tbpiNickname = tbpiNickname;
		this.setSeted(F.tbpiNickname);
		return this;
	}
	
		
	/** 街道        **/
	public TbPartnerIncome tbpiStreet(String tbpiStreet){
		this.tbpiStreet = tbpiStreet;
		this.setSeted(F.tbpiStreet);
		return this;
	}
	
		
	/** 省市区        **/
	public TbPartnerIncome tbpiCity(String tbpiCity){
		this.tbpiCity = tbpiCity;
		this.setSeted(F.tbpiCity);
		return this;
	}
	
		
	/** 下单时间        **/
	public TbPartnerIncome tbpiOrderTime(Date tbpiOrderTime){
		this.tbpiOrderTime = tbpiOrderTime;
		this.setSeted(F.tbpiOrderTime);
		return this;
	}
	
		
	/** 收益金额        **/
	public TbPartnerIncome tbpiMoney(Double tbpiMoney){
		this.tbpiMoney = tbpiMoney;
		this.setSeted(F.tbpiMoney);
		return this;
	}
	
	
	
	/**
	* 克隆对象
	**/
	public TbPartnerIncome clone(){
		TbPartnerIncome clone = new TbPartnerIncome();
		
			
			
		clone.tbpiBrand=this.tbpiBrand;
		
			
			
		clone.tbpiMember=this.tbpiMember;
		
			
		clone.tbpiOrderNo=this.tbpiOrderNo;
		
			
		clone.tbpiOrderType=this.tbpiOrderType;
		
			
		clone.tbpiPartnerNickname=this.tbpiPartnerNickname;
		
			
		clone.tbpiHead=this.tbpiHead;
		
			
		clone.tbpiNickname=this.tbpiNickname;
		
			
		clone.tbpiStreet=this.tbpiStreet;
		
			
		clone.tbpiCity=this.tbpiCity;
		
			
		clone.tbpiOrderTime=this.tbpiOrderTime;
		
			
		clone.tbpiMoney=this.tbpiMoney;
		
		return clone;
	}
	
	
	
	
	
	/**
	 * 根据ID取合伙人收益
	 * @param id
	 * @return
	 */
	public static @api TbPartnerIncome get(Long id){		
		return getTbPartnerIncomeById(id);
	}
	
	
	/**
	 * 设置ID
	 * @param id
	 * @return
	 */
	public void setId(Long id){		
		this.tbpiId = id;
	}
	
	
	/**
	 * 获取所有合伙人收益
	 * @return
	 */
	public static @api List<TbPartnerIncome> list(Map params,Integer size){
		return getTbPartnerIncomeList(params,size);
	}
	/**
	 * 获取合伙人收益分页
	 * @return
	 */
	public static @api Page<TbPartnerIncome> page(Integer page,Integer size,Map params){
		return getTbPartnerIncomePage(page, size , params);
	}
	
	
	/**
	 * 根据查询条件取合伙人收益
	 * @param params
	 * @return
	 */
	public static @api TbPartnerIncome Get(Map params){
		return getTbPartnerIncome(params);
	}
	/**
	 * 获取合伙人收益数
	 * @return
	 */
	public static @api Long count(Map params){
		return getTbPartnerIncomeCount(params);
	}
	/**
	 * 获取合伙人收益数
	 * @return
	 */
	public static @api <T> T eval(String eval,Map params){
		return getTbPartnerIncomeEval(eval,params);
	}
	
	
	/**
	 * 获取合伙人收益图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> stats(Map params,C sumKey,C groupKey){
		return getTbPartnerIncomeStats(params,sumKey,groupKey,-1);
	}
	/**
	 * 获取合伙人收益图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 分组的字段
	 * @param dateType 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> stats(Map params,C sumKey,C groupKey,int dateType){
		return getTbPartnerIncomeStats(params,sumKey,groupKey,dateType);
	}
	
	
	/**
	 * 根据ID取合伙人收益
	 * @param id
	 * @return
	 */
	public static @api TbPartnerIncome getTbPartnerIncomeById(Long id){		
		return getTbPartnerIncomeDao().getTbPartnerIncomeById(id);
	}
	
	
	/**
	 * 获取id
	 * @return
	 */
	public Long getId(){
		return this.tbpiId;
	}
	
	
	
	/**
	 * 根据ID取合伙人收益的标识键值
	 * @param id
	 * @return
	 */
	public static @api String getKeyValue(Object key){
		Long id = Utils.parseLong(key);	
		if(id==null || id.longValue()==0 ){
			
			return null;
			
		}
		String value = null;
		
		value = Cache.getValue(TbPartnerIncome.class, id);
				
		if(value==null){
			TbPartnerIncome tbPartnerIncome = get(id);
			if(tbPartnerIncome!=null){
				String strValue = tbPartnerIncome.getTbpiId$();
				
				
				Cache.setValue(TbPartnerIncome.class, id ,strValue);
				
				value = strValue;
			}else{
				
				Cache.setValue(TbPartnerIncome.class, id ,"{"+id+"}",30);
				
				value = "{"+id+"}";
			}
		}
		
		/************LAZY3Q_ID_KEYVALUE************/
		/************LAZY3Q_ID_KEYVALUE************/
		return value;
	}	
	
	
	/**
	 * 获取当前对象的键值
	 * @return
	 */
	public String getKeyValue(){
		
		/************LAZY3Q_CODE_KEYVALUE************/
		/************LAZY3Q_CODE_KEYVALUE************/
		String keyValue = this.getTbpiId$();
		
		return keyValue;
	}
	
	
	/**
	 * 根据关键字精确查询合伙人收益对象
	 * @return
	 */
	public static @api TbPartnerIncome find(String key){
		if(Utils.empty(key))return null;
		Map params = new HashMap();
		if(key.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
			params.put("tbpiId", key.toLowerCase().replaceFirst("id:", ""));					
		else{//按标识查询，精确查询
			String strDefinex = "";
			
			strDefinex="(2=1 "+strDefinex+")";
			params.put("definex",strDefinex);
		}
		
		/************LAZY3Q_CODE_FIND************/
		/************LAZY3Q_CODE_FIND************/
		return TbPartnerIncome.getTbPartnerIncome(params);
	}
	
	
	/**
	 * 根据关键字查询合伙人收益
	 * @return
	 */
	public static @api List<Map> query(String key,int size,Map params,Boolean bObject){
		if(Utils.empty((String)params.get("asc")) && Utils.empty((String)params.get("desc")))//如果未传入排序字段
			params.put("desc","tbpi_id");//那么，默认以主键降序，传给Dao层
		String strTerm=key;		
		if(!Utils.empty(strTerm)){
			if(strTerm.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
				params.put("tbpiId", strTerm.toLowerCase().replaceFirst("id:", ""));					
			else//按标识查询，模糊查询请带%
			{
				String strDefinex = "";
				
				strDefinex="(2=1 "+strDefinex+")";
				params.put("definex",strDefinex);
			}
		}
		
		
		/************LAZY3Q_CODE_QUERY************/
		/************LAZY3Q_CODE_QUERY************/
			
		List<TbPartnerIncome> list = page(0,size,params).getResult();
		
		/**
		* OK!取到数据拼成放入Map中，[{value,text,object:{...}},...]
		* value:数据ID，text:数据标识,object,整个对象
		**/
		List<Map> result = new java.util.ArrayList();
		for(TbPartnerIncome tbPartnerIncome:list){
			Map map = new HashMap();
			map.put("key",tbPartnerIncome.getTbpiId().toString());
			map.put("value", Utils.js(tbPartnerIncome.getKeyValue()));
			if(bObject==true)
				map.put("object",tbPartnerIncome);
			result.add(map);
		}
		
		
		/************LAZY3Q_AFTER_QUERY************/
		/************LAZY3Q_AFTER_QUERY************/
		
		return result;
	}
	
	
	
	/**
	 * 获取所有合伙人收益
	 * @return
	 */
	public static @api List<TbPartnerIncome> getTbPartnerIncomeList(Map params,Integer size){
		return getTbPartnerIncomeDao().getTbPartnerIncomeList(params,0,size);
	}
	
	/**
	 * 获取合伙人收益分页
	 * @return
	 */
	public static @api Page<TbPartnerIncome> getTbPartnerIncomePage(Integer page,Integer size,Map params){
		if(page==null)page=0;
		if(size==null)size=20;
		return getTbPartnerIncomeDao().getTbPartnerIncomePage(page, size , params);
	}
	
	/**
	 * 根据查询条件取合伙人收益
	 * @param params
	 * @return
	 */
	public static @api TbPartnerIncome getTbPartnerIncome(Map params){
		return getTbPartnerIncomeDao().getTbPartnerIncome(params);
	}
	
	/**
	 * 保存一个合伙人收益
	 * @param tbPartnerIncome
	 * @return
	 */
	public static @api TbPartnerIncome saveTbPartnerIncome(TbPartnerIncome tbPartnerIncome){
		return getTbPartnerIncomeDao().saveTbPartnerIncome(tbPartnerIncome);
	}
	
	/**
	 * 根据条件更新合伙人收益
	 * @param values
	 * @param params
	 */
	public static @api int updateTbPartnerIncomeByConfirm(Map values, Map params){
		return getTbPartnerIncomeDao().updateTbPartnerIncomeByConfirm(values,params);
	}
	
	/**
	 * 修改一个合伙人收益
	 * @param tbPartnerIncome
	 * @return
	 */
	public static @api int updateTbPartnerIncome(TbPartnerIncome tbPartnerIncome){
		return getTbPartnerIncomeDao().updateTbPartnerIncome(tbPartnerIncome);
	}
	
	/**
	 * 更新合伙人收益非空字段
	 * @param tbPartnerIncome
	 */
	public static @api int updateTbPartnerIncome$NotNull(TbPartnerIncome tbPartnerIncome){
		return getTbPartnerIncomeDao().updateTbPartnerIncome$NotNull(tbPartnerIncome);
	}
	
	/**
	 * 获取合伙人收益数
	 * @return
	 */
	public static @api Long getTbPartnerIncomeCount(Map params){
		return getTbPartnerIncomeDao().getTbPartnerIncomeCount(params);
	}
		
		
	/**
	 * 获取合伙人收益自定义求和表达式,比如求和:eval="sum(id)"
	 * @return
	 */	
	public static @api <T> T getTbPartnerIncomeEval(String eval,Map params){
		return getTbPartnerIncomeDao().getTbPartnerIncomeEval(eval,params);
	}
	
	
	/**
	 * 获取合伙人收益图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 分组的字段
	 * @param dateType 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> getTbPartnerIncomeStats(Map params,C sumKey,C groupKey,int dateType){
		//TODO:图表统计功能未实现
		
		Map<String,Object> groups=new HashMap();//要分组的字段
		Map<String,Object> sums=new HashMap();//要统计的字段
		
		String[][] dateFormats=new String[][]{
				null,
				new String[]{"%Y","yyyy年","Y"},
				new String[]{"%Y-%m","yyyy年MM月","M"},
				new String[]{"%Y%U","yyyy年第ww周","W"},
				new String[]{"%Y-%m-%d","yyyy年MM月dd日","D"},
				new String[]{"%Y-%m-%d %H","yyyy年MM月dd日 HH点","H"},
				new String[]{"%m","MM月"},
				new String[]{"%d","dd号"},
				new String[]{"%H","HH点"} 
		};
		
		//获取要分组的字段，放入Map中
		if(dateType>0){
			groups.put(groupKey.toString(),"DATE_FORMAT({key},'"+dateFormats[dateType][0]+"')");
		}else{
			groups.put(groupKey.toString(),"{key}");
		}
		if(dateType<6 && dateType>0){ 
			params.put("asc", groupKey.toString()); 
			if(params.get(groupKey.name()+"Start")==null){
				params.put(groupKey.name()+"Start", Utils.date(new Date(), -24, dateFormats[dateType][2]));
			}
		}
		
		
		//获取要统计的字段，放入Map中
		if(sumKey.toString().equals("count")){
			sums.put(sumKey.toString(),"count(*)");
		}else{
			sums.put(sumKey.toString(),"sum({key})");
		}
		
		List<Map> list = getTbPartnerIncomeDao().getTbPartnerIncomeStats(params,groups,sums);
		
		List<Map> result = new ArrayList();
		for(Map m:list){
			Map map = new HashMap();
			Object value = m.get(sumKey.toString());
			Object name = null;
			Object groupValue = m.get(groupKey.toString());
			if(dateType>0){
				name = Utils.date(Utils.parseDate(groupValue), dateFormats[dateType][1]);
			}else{
				try{
					java.lang.reflect.Method method = TbPartnerIncome.class.getMethod("get"+Utils.ForMat(groupKey.toString())+"$");
					method.setAccessible(true);
					name = method.invoke(TbPartnerIncome.fromMap(m));
				}catch(Exception ex){
					ex.printStackTrace();
				}
			}
			map.put("name", name);
			map.put("value", value);
			result.add(map);
		}
		return result;
	}
	
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static int updateTbPartnerIncome(Map set,Map where){
		if(set.isEmpty())throw new RuntimeException("set为空");
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		return getTbPartnerIncomeDao().updateTbPartnerIncomeByConfirm(set, where);
	}
	
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void deleteTbPartnerIncome(Map where){
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		getTbPartnerIncomeDao().deleteTbPartnerIncomeByConfirm(where);
	}
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void delete(Long id){
		if(id==null)throw new RuntimeException("id为空");
		
		getTbPartnerIncomeDao().deleteTbPartnerIncomeById(id);
		
	}
	
	
	/**
	 * 保存合伙人收益对象
	 * @param params
	 * @return
	 */
	public TbPartnerIncome save(){
		if(this.getTbpiId()!=null)
			getTbPartnerIncomeDao().updateTbPartnerIncome(this);
		else
			return getTbPartnerIncomeDao().saveTbPartnerIncome(this);
		return this;
	}
	
	
	/**
	 * 更新合伙人收益对象的非空字段,注意跟Service里面的update不一样哦
	 * @param params
	 * @return
	 */
	public int update(){
		return getTbPartnerIncomeDao().updateTbPartnerIncome$NotNull(this);
	}
	
	
	/**
	 * 删除
	 * @param params
	 * @return
	 */
	public void delete(){
		
			getTbPartnerIncomeDao().deleteTbPartnerIncomeById(this.getTbpiId());
	}
	
	/**
	 * 执行事务
	 * @param function
	 */
	public static <T> T execute(Function function){
		return getTbPartnerIncomeDao().executeTransaction(function);
	}

	
	
	/*******************************编号**********************************/	
	/**
	* 编号 [非空]      
	**/
	public Long getTbpiId(){
		
		if(this.tbpiId!=null){
			return this.tbpiId;
		}
		
		return this.tbpiId;
	}
	/**
	* 获取编号格式化(toString)
	**/
	public String getTbpiId$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiId());
	 
	 	 return strValue;
	}
	/**
	* 根据编号反格式化
	**/
	public void setTbpiId$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiId=null;
			return;
		}
	
	
	 	this.tbpiId=Utils.parseLong(strValue);
	 
	}
	
	/**
	* 编号 [非空]      
	**/
	public void setTbpiId(Long tbpiId){
		this.tbpiId = tbpiId;
		
		this.setSeted(F.tbpiId);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************品牌**********************************/	
	/**
	* 品牌  [Merchant]     
	**/
	public Long getTbpiBrand(){
		
		if(this.tbpiBrand!=null){
			return this.tbpiBrand;
		}
		
		return this.tbpiBrand;
	}
	/**
	* 获取品牌格式化(toString)
	**/
	public String getTbpiBrand$(){
		String strValue="";
	
	
		 
		if(this.getTbpiBrand()!=null){
			
				strValue+=Utils.string(Merchant.getKeyValue(this.getTbpiBrand()));
			
		}			
		 
	 
	 	 return strValue;
	}
	/**
	* 根据品牌反格式化
	**/
	public void setTbpiBrand$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiBrand=null;
			return;
		}
	
	
		 
		Merchant item = Merchant.find(strValue);
		if(item!=null){
			
			this.tbpiBrand = Utils.parseLong(item.getId());
			
		}
		 
	 
	}
	
	/**
	* 品牌  [Merchant]     
	**/
	public void setTbpiBrand(Long tbpiBrand){
		this.tbpiBrand = tbpiBrand;
		
		this.setSeted(F.tbpiBrand);
		
	}
	
	
		 
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 		
	/**
	* 获取关联对象[品牌信息]
	**/	 			
 	public Merchant get$tbpiBrand(){
 		if(this.$tbpiBrand!=null)
 			return this.$tbpiBrand;
 		com.distribute.framework.model.Merchant merchant = null;
		if(this.getTbpiBrand()!=null){
		
 			merchant = Merchant.get(this.getTbpiBrand());
 		
 		}
 		return merchant;
	}
	
 	
	
	
	/*******************************会员名称**********************************/	
	/**
	* 会员名称       
	**/
	public String getNickName(){
		
		if(this.nickName!=null){
			return this.nickName;
		}
		
		Member member = Member.get(this.getTbpiMember());
		if(member!=null){
			this.nickName=member.getNickName();
		}
				
		
		return this.nickName;
	}
	/**
	* 获取会员名称格式化(toString)
	**/
	public String getNickName$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getNickName());
	 
	 	 return strValue;
	}
	/**
	* 根据会员名称反格式化
	**/
	public void setNickName$(String strValue){
		if(Utils.empty(strValue)){
			this.nickName=null;
			return;
		}
	
	
	 	this.nickName=strValue;
	 
	}
	
	/**
	* 会员名称       
	**/
	public void setNickName(String nickName){
		this.nickName = nickName;
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************会员**********************************/	
	/**
	* 会员  [Member]     
	**/
	public Long getTbpiMember(){
		
		if(this.tbpiMember!=null){
			return this.tbpiMember;
		}
		
		return this.tbpiMember;
	}
	/**
	* 获取会员格式化(toString)
	**/
	public String getTbpiMember$(){
		String strValue="";
	
	
		 
		if(this.getTbpiMember()!=null){
			
				strValue+=Utils.string(Member.getKeyValue(this.getTbpiMember()));
			
		}			
		 
	 
	 	 return strValue;
	}
	/**
	* 根据会员反格式化
	**/
	public void setTbpiMember$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiMember=null;
			return;
		}
	
	
		 
		Member item = Member.find(strValue);
		if(item!=null){
			
			this.tbpiMember = Utils.parseLong(item.getUid());
			
		}
		 
	 
	}
	
	/**
	* 会员  [Member]     
	**/
	public void setTbpiMember(Long tbpiMember){
		this.tbpiMember = tbpiMember;
		
		this.setSeted(F.tbpiMember);
		
	}
	
	
		 
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 		
	/**
	* 获取关联对象[会员信息]
	**/	 			
 	public Member get$tbpiMember(){
 		if(this.$tbpiMember!=null)
 			return this.$tbpiMember;
 		com.distribute.framework.model.Member member = null;
		if(this.getTbpiMember()!=null){
		
 			member = Member.get(this.getTbpiMember());
 		
 		}
 		return member;
	}
	
 	
	
	
	/*******************************订单号**********************************/	
	/**
	* 订单号       
	**/
	public String getTbpiOrderNo(){
		
		if(this.tbpiOrderNo!=null){
			return this.tbpiOrderNo;
		}
		
		return this.tbpiOrderNo;
	}
	/**
	* 获取订单号格式化(toString)
	**/
	public String getTbpiOrderNo$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiOrderNo());
	 
	 	 return strValue;
	}
	/**
	* 根据订单号反格式化
	**/
	public void setTbpiOrderNo$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiOrderNo=null;
			return;
		}
	
	
	 	this.tbpiOrderNo=strValue;
	 
	}
	
	/**
	* 订单号       
	**/
	public void setTbpiOrderNo(String tbpiOrderNo){
		this.tbpiOrderNo = tbpiOrderNo;
		
		this.setSeted(F.tbpiOrderNo);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************订单类型**********************************/	
	/**
	* 订单类型    1:直接购买 2:余额提货订单    
	**/
	public Short getTbpiOrderType(){
		
		if(this.tbpiOrderType!=null){
			return this.tbpiOrderType;
		}
		
		return this.tbpiOrderType;
	}
	/**
	* 获取订单类型格式化(toString)
	**/
	public String getTbpiOrderType$(){
		String strValue="";
	
	
		
			
		 if(Utils.equals(Utils.string(this.getTbpiOrderType()),"1"))
			strValue=Utils.string("直接购买");		 
			
		 if(Utils.equals(Utils.string(this.getTbpiOrderType()),"2"))
			strValue=Utils.string("余额提货订单");		 
			
		
	 
	 	 return strValue;
	}
	/**
	* 根据订单类型反格式化
	**/
	public void setTbpiOrderType$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiOrderType=null;
			return;
		}
	
	
		
			
		 if(Utils.equals(strValue,"直接购买"))
		 	this.tbpiOrderType=Utils.parseShort("1");
			
		 if(Utils.equals(strValue,"余额提货订单"))
		 	this.tbpiOrderType=Utils.parseShort("2");
			
		
	 
	}
	
	/**
	* 订单类型    1:直接购买 2:余额提货订单    
	**/
	public void setTbpiOrderType(Short tbpiOrderType){
		this.tbpiOrderType = tbpiOrderType;
		
		this.setSeted(F.tbpiOrderType);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************合伙人昵称**********************************/	
	/**
	* 合伙人昵称       
	**/
	public String getTbpiPartnerNickname(){
		
		if(this.tbpiPartnerNickname!=null){
			return this.tbpiPartnerNickname;
		}
		
		return this.tbpiPartnerNickname;
	}
	/**
	* 获取合伙人昵称格式化(toString)
	**/
	public String getTbpiPartnerNickname$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiPartnerNickname());
	 
	 	 return strValue;
	}
	/**
	* 根据合伙人昵称反格式化
	**/
	public void setTbpiPartnerNickname$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiPartnerNickname=null;
			return;
		}
	
	
	 	this.tbpiPartnerNickname=strValue;
	 
	}
	
	/**
	* 合伙人昵称       
	**/
	public void setTbpiPartnerNickname(String tbpiPartnerNickname){
		this.tbpiPartnerNickname = tbpiPartnerNickname;
		
		this.setSeted(F.tbpiPartnerNickname);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************下单人头像**********************************/	
	/**
	* 下单人头像       
	**/
	public String getTbpiHead(){
		
		if(this.tbpiHead!=null){
			return this.tbpiHead;
		}
		
		return this.tbpiHead;
	}
	/**
	* 获取下单人头像格式化(toString)
	**/
	public String getTbpiHead$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiHead());
	 
	 	 return strValue;
	}
	/**
	* 根据下单人头像反格式化
	**/
	public void setTbpiHead$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiHead=null;
			return;
		}
	
	
	 	this.tbpiHead=strValue;
	 
	}
	
	/**
	* 下单人头像       
	**/
	public void setTbpiHead(String tbpiHead){
		this.tbpiHead = tbpiHead;
		
		this.setSeted(F.tbpiHead);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************下单人昵称**********************************/	
	/**
	* 下单人昵称       
	**/
	public String getTbpiNickname(){
		
		if(this.tbpiNickname!=null){
			return this.tbpiNickname;
		}
		
		return this.tbpiNickname;
	}
	/**
	* 获取下单人昵称格式化(toString)
	**/
	public String getTbpiNickname$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiNickname());
	 
	 	 return strValue;
	}
	/**
	* 根据下单人昵称反格式化
	**/
	public void setTbpiNickname$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiNickname=null;
			return;
		}
	
	
	 	this.tbpiNickname=strValue;
	 
	}
	
	/**
	* 下单人昵称       
	**/
	public void setTbpiNickname(String tbpiNickname){
		this.tbpiNickname = tbpiNickname;
		
		this.setSeted(F.tbpiNickname);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************街道**********************************/	
	/**
	* 街道       
	**/
	public String getTbpiStreet(){
		
		if(this.tbpiStreet!=null){
			return this.tbpiStreet;
		}
		
		return this.tbpiStreet;
	}
	/**
	* 获取街道格式化(toString)
	**/
	public String getTbpiStreet$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiStreet());
	 
	 	 return strValue;
	}
	/**
	* 根据街道反格式化
	**/
	public void setTbpiStreet$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiStreet=null;
			return;
		}
	
	
	 	this.tbpiStreet=strValue;
	 
	}
	
	/**
	* 街道       
	**/
	public void setTbpiStreet(String tbpiStreet){
		this.tbpiStreet = tbpiStreet;
		
		this.setSeted(F.tbpiStreet);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************省市区**********************************/	
	/**
	* 省市区       
	**/
	public String getTbpiCity(){
		
		if(this.tbpiCity!=null){
			return this.tbpiCity;
		}
		
		return this.tbpiCity;
	}
	/**
	* 获取省市区格式化(toString)
	**/
	public String getTbpiCity$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getTbpiCity());
	 
	 	 return strValue;
	}
	/**
	* 根据省市区反格式化
	**/
	public void setTbpiCity$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiCity=null;
			return;
		}
	
	
	 	this.tbpiCity=strValue;
	 
	}
	
	/**
	* 省市区       
	**/
	public void setTbpiCity(String tbpiCity){
		this.tbpiCity = tbpiCity;
		
		this.setSeted(F.tbpiCity);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************下单时间**********************************/	
	/**
	* 下单时间       
	**/
	public Date getTbpiOrderTime(){
		
		if(this.tbpiOrderTime!=null){
			return this.tbpiOrderTime;
		}
		
		return this.tbpiOrderTime;
	}
	/**
	* 获取下单时间格式化(toString)
	**/
	public String getTbpiOrderTime$(){
		String strValue="";
	
	
	 	
		 strValue=Utils.string(Utils.date(this.getTbpiOrderTime(),"yyyy-MM-dd HH:mm:ss"));
		
	 
	 	 return strValue;
	}
	/**
	* 根据下单时间反格式化
	**/
	public void setTbpiOrderTime$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiOrderTime=null;
			return;
		}
	
	
	 	this.tbpiOrderTime=Utils.date(strValue,"yyyy-MM-dd HH:mm:ss");
	 
	}
	
	/**
	* 下单时间       
	**/
	public void setTbpiOrderTime(Date tbpiOrderTime){
		this.tbpiOrderTime = tbpiOrderTime;
		
		this.setSeted(F.tbpiOrderTime);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************收益金额**********************************/	
	/**
	* 收益金额       
	**/
	public Double getTbpiMoney(){
		
		if(this.tbpiMoney!=null){
			return this.tbpiMoney;
		}
		
		return this.tbpiMoney;
	}
	/**
	* 获取收益金额格式化(toString)
	**/
	public String getTbpiMoney$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getTbpiMoney());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据收益金额反格式化
	**/
	public void setTbpiMoney$(String strValue){
		if(Utils.empty(strValue)){
			this.tbpiMoney=null;
			return;
		}
	
	
	 	this.tbpiMoney=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 收益金额       
	**/
	public void setTbpiMoney(Double tbpiMoney){
		this.tbpiMoney = tbpiMoney;
		
		this.setSeted(F.tbpiMoney);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	
	/************LAZY3Q_DEFINE_CODE************/
	/************LAZY3Q_DEFINE_CODE************/	
	
	
	/**
	 * 触发器
	 */
	public static void on(Trigger.Index index,final Notify.Listener listener,Trigger.Type... types){
		Notify.on(TbPartnerIncome.class, index, listener, types);
	}
	public static void on(final Notify.Listener listener,String type){
		Notify.on(TbPartnerIncome.class, listener, type);
	}
	/**
	 * 当修改字段时
	 * @param filedName
	 * @param listener
	 */
	public static void on(String filedName,final Notify.Listener listener){
		Notify.on(TbPartnerIncome.class, listener, filedName);
	}
	/**
	 * 当修改字段为某值时
	 * @param filedName
	 * @param value
	 * @param listener
	 */
	public static void on(String filedName,Object value,final Notify.Listener listener){
		if(value==null)return;
		Notify.on(TbPartnerIncome.class, listener, filedName+"."+Utils.md5(""+value));
	}
	public void notify(String type){
		Trigger.on(TbPartnerIncome.class,type, this);
	}
	
	
	/**
	 * 用来获取当有字段关联对象时的获取方式,调用如${TbPartnerIncome.obj.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${TbPartnerIncome.$filedName}获取关联对象
	 */
	public Map getObj(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return TbPartnerIncome.class.getMethod("get$"+Utils.forMat(key.toString())).invoke(TbPartnerIncome.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 用来获取某字段格式化的获取方式,调用如${TbPartnerIncome.fmt.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${TbPartnerIncome.filedName$}获取某字段格式化
	 */
	public Map getFmt(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return TbPartnerIncome.class.getMethod("get"+Utils.ForMat(key.toString()+"$")).invoke(TbPartnerIncome.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 获取查询参数链式串
	 * @return
	 */
	public static @Deprecated M where(){ return new M(0); }
	public static @Deprecated M m(){ return new M(0); }
	public static M where = new M(0,true);
	public static @database(DatabaseNames.distribute_sys) class M extends IbatisMap{
		int type = 0; 
		M linked = null;
		Boolean proxy = false;
		public M set = null;
		public M(int type){
			this.type = type;
			if(this.type==0){
				set = new M(1,true);
				set.linked = this;
			}
		};
		public M(int type,Boolean proxy){
			this.type = type;
			this.proxy=proxy;
		};
		public M proxy(){
			M m = new M(this.type);//当前的对像
			if(this.type==0){
				m.set = new M(1,true);//set对象
				m.set.linked = m;
			}else{
				m.linked=this.linked;
				this.linked.linked=m;
			}
			return m;
		}
		public @Deprecated M set(){			
			M m = this;
			m.linked=new M(1);
			m.linked.linked=m;
			return m.linked;
		};
		
		public M on(IbatisMap value,C column,String joinColumn){if(proxy)return proxy().on(value,column,joinColumn);this.put(value.getClass().getDeclaringClass().getSimpleName(), value);value.put("on", column.toString());value.put("to", joinColumn);return this;};
		
		
			
		
		/** 编号 [非空]       **/
		public M tbpiId(Object tbpiId){if(proxy)return proxy().tbpiId(tbpiId);  this.put("tbpiId", tbpiId);return this;};
	 	/** and tbpi_id is null */
 		public M tbpiIdNull(){if(proxy)return proxy().tbpiIdNull();if(this.get("tbpiIdNot")==null)this.put("tbpiIdNot", "");this.put("tbpiId", null);return this;};
 		/** not .... */
 		public M tbpiIdNot(){if(proxy)return proxy().tbpiIdNot();this.put("tbpiIdNot", "not");return this;};
 		public M tbpiIdNotNull(){if(proxy)return proxy().tbpiIdNotNull();this.put("tbpiIdNot", "not");this.put("tbpiId", null);return this;};
 		public M tbpiIdNot(Object tbpiId){if(proxy)return proxy().tbpiIdNot(tbpiId);this.put("tbpiIdNot", "not");this.put("tbpiId", tbpiId);return this;};
	 		
		/** and tbpi_id <= ? */
		public M tbpiIdMin(Object min){if(proxy)return proxy().tbpiIdMin(min);this.put("tbpiIdMin", min);return this;};
		/** and tbpi_id >= ? */
		public M tbpiIdMax(Object max){if(proxy)return proxy().tbpiIdMax(max);this.put("tbpiIdMax", max);return this;};
			
			
		public M tbpiIdIn(String ids){
			if(proxy)return proxy().tbpiIdIn(ids);  this.put("tbpiIdIn", ids);return this;
		};	
 			
		
			
	 	
			
		public M tbpiBrand$on(Merchant.M value){if(proxy)return proxy().tbpiBrand$on(value);this.put("TbpiBrand", value);value.put("on", "tbpi_brand");return this;};
 				
 			
		
		/** 品牌  [Merchant]      **/
		public M tbpiBrand(Object tbpiBrand){if(proxy)return proxy().tbpiBrand(tbpiBrand);  this.put("tbpiBrand", tbpiBrand);return this;};
	 	/** and tbpi_brand is null */
 		public M tbpiBrandNull(){if(proxy)return proxy().tbpiBrandNull();if(this.get("tbpiBrandNot")==null)this.put("tbpiBrandNot", "");this.put("tbpiBrand", null);return this;};
 		/** not .... */
 		public M tbpiBrandNot(){if(proxy)return proxy().tbpiBrandNot();this.put("tbpiBrandNot", "not");return this;};
 		public M tbpiBrandNotNull(){if(proxy)return proxy().tbpiBrandNotNull();this.put("tbpiBrandNot", "not");this.put("tbpiBrand", null);return this;};
 		public M tbpiBrandNot(Object tbpiBrand){if(proxy)return proxy().tbpiBrandNot(tbpiBrand);this.put("tbpiBrandNot", "not");this.put("tbpiBrand", tbpiBrand);return this;};
	 		
			
		public M tbpiBrandIn(String ids){
			if(proxy)return proxy().tbpiBrandIn(ids);  this.put("tbpiBrandIn", ids);return this;
		};	
 			
		
			
	 	
			
		
		/** 会员名称        **/
		public M nickName(Object nickName){if(proxy)return proxy().nickName(nickName);  this.put("nickName", nickName);return this;};
	 	/** and nick_name is null */
 		public M nickNameNull(){if(proxy)return proxy().nickNameNull();if(this.get("nickNameNot")==null)this.put("nickNameNot", "");this.put("nickName", null);return this;};
 		/** not .... */
 		public M nickNameNot(){if(proxy)return proxy().nickNameNot();this.put("nickNameNot", "not");return this;};
 		public M nickNameNotNull(){if(proxy)return proxy().nickNameNotNull();this.put("nickNameNot", "not");this.put("nickName", null);return this;};
 		public M nickNameNot(Object nickName){if(proxy)return proxy().nickNameNot(nickName);this.put("nickNameNot", "not");this.put("nickName", nickName);return this;};
	 		
			
		
			
	 	
			
		public M tbpiMember$on(Member.M value){if(proxy)return proxy().tbpiMember$on(value);this.put("TbpiMember", value);value.put("on", "tbpi_member");return this;};
 				
 			
		
		/** 会员  [Member]      **/
		public M tbpiMember(Object tbpiMember){if(proxy)return proxy().tbpiMember(tbpiMember);  this.put("tbpiMember", tbpiMember);return this;};
	 	/** and tbpi_member is null */
 		public M tbpiMemberNull(){if(proxy)return proxy().tbpiMemberNull();if(this.get("tbpiMemberNot")==null)this.put("tbpiMemberNot", "");this.put("tbpiMember", null);return this;};
 		/** not .... */
 		public M tbpiMemberNot(){if(proxy)return proxy().tbpiMemberNot();this.put("tbpiMemberNot", "not");return this;};
 		public M tbpiMemberNotNull(){if(proxy)return proxy().tbpiMemberNotNull();this.put("tbpiMemberNot", "not");this.put("tbpiMember", null);return this;};
 		public M tbpiMemberNot(Object tbpiMember){if(proxy)return proxy().tbpiMemberNot(tbpiMember);this.put("tbpiMemberNot", "not");this.put("tbpiMember", tbpiMember);return this;};
	 		
			
		public M tbpiMemberIn(String ids){
			if(proxy)return proxy().tbpiMemberIn(ids);  this.put("tbpiMemberIn", ids);return this;
		};	
 			
		
			
	 	
			
		
		/** 订单号        **/
		public M tbpiOrderNo(Object tbpiOrderNo){if(proxy)return proxy().tbpiOrderNo(tbpiOrderNo);  this.put("tbpiOrderNo", tbpiOrderNo);return this;};
	 	/** and tbpi_order_no is null */
 		public M tbpiOrderNoNull(){if(proxy)return proxy().tbpiOrderNoNull();if(this.get("tbpiOrderNoNot")==null)this.put("tbpiOrderNoNot", "");this.put("tbpiOrderNo", null);return this;};
 		/** not .... */
 		public M tbpiOrderNoNot(){if(proxy)return proxy().tbpiOrderNoNot();this.put("tbpiOrderNoNot", "not");return this;};
 		public M tbpiOrderNoNotNull(){if(proxy)return proxy().tbpiOrderNoNotNull();this.put("tbpiOrderNoNot", "not");this.put("tbpiOrderNo", null);return this;};
 		public M tbpiOrderNoNot(Object tbpiOrderNo){if(proxy)return proxy().tbpiOrderNoNot(tbpiOrderNo);this.put("tbpiOrderNoNot", "not");this.put("tbpiOrderNo", tbpiOrderNo);return this;};
	 		
			
		
			
	 	
			
		
		/** 订单类型    1:直接购买 2:余额提货订单     **/
		public M tbpiOrderType(Object tbpiOrderType){if(proxy)return proxy().tbpiOrderType(tbpiOrderType);  this.put("tbpiOrderType", tbpiOrderType);return this;};
	 	/** and tbpi_order_type is null */
 		public M tbpiOrderTypeNull(){if(proxy)return proxy().tbpiOrderTypeNull();if(this.get("tbpiOrderTypeNot")==null)this.put("tbpiOrderTypeNot", "");this.put("tbpiOrderType", null);return this;};
 		/** not .... */
 		public M tbpiOrderTypeNot(){if(proxy)return proxy().tbpiOrderTypeNot();this.put("tbpiOrderTypeNot", "not");return this;};
 		public M tbpiOrderTypeNotNull(){if(proxy)return proxy().tbpiOrderTypeNotNull();this.put("tbpiOrderTypeNot", "not");this.put("tbpiOrderType", null);return this;};
 		public M tbpiOrderTypeNot(Object tbpiOrderType){if(proxy)return proxy().tbpiOrderTypeNot(tbpiOrderType);this.put("tbpiOrderTypeNot", "not");this.put("tbpiOrderType", tbpiOrderType);return this;};
	 		
			
		public M tbpiOrderTypeIn(String ids){
			if(proxy)return proxy().tbpiOrderTypeIn(ids);  this.put("tbpiOrderTypeIn", ids);return this;
		};	
 			
		
			
	 	
			
		
		/** 合伙人昵称        **/
		public M tbpiPartnerNickname(Object tbpiPartnerNickname){if(proxy)return proxy().tbpiPartnerNickname(tbpiPartnerNickname);  this.put("tbpiPartnerNickname", tbpiPartnerNickname);return this;};
	 	/** and tbpi_partner_nickname is null */
 		public M tbpiPartnerNicknameNull(){if(proxy)return proxy().tbpiPartnerNicknameNull();if(this.get("tbpiPartnerNicknameNot")==null)this.put("tbpiPartnerNicknameNot", "");this.put("tbpiPartnerNickname", null);return this;};
 		/** not .... */
 		public M tbpiPartnerNicknameNot(){if(proxy)return proxy().tbpiPartnerNicknameNot();this.put("tbpiPartnerNicknameNot", "not");return this;};
 		public M tbpiPartnerNicknameNotNull(){if(proxy)return proxy().tbpiPartnerNicknameNotNull();this.put("tbpiPartnerNicknameNot", "not");this.put("tbpiPartnerNickname", null);return this;};
 		public M tbpiPartnerNicknameNot(Object tbpiPartnerNickname){if(proxy)return proxy().tbpiPartnerNicknameNot(tbpiPartnerNickname);this.put("tbpiPartnerNicknameNot", "not");this.put("tbpiPartnerNickname", tbpiPartnerNickname);return this;};
	 		
			
		
			
	 	
			
		
		/** 下单人头像        **/
		public M tbpiHead(Object tbpiHead){if(proxy)return proxy().tbpiHead(tbpiHead);  this.put("tbpiHead", tbpiHead);return this;};
	 	/** and tbpi_head is null */
 		public M tbpiHeadNull(){if(proxy)return proxy().tbpiHeadNull();if(this.get("tbpiHeadNot")==null)this.put("tbpiHeadNot", "");this.put("tbpiHead", null);return this;};
 		/** not .... */
 		public M tbpiHeadNot(){if(proxy)return proxy().tbpiHeadNot();this.put("tbpiHeadNot", "not");return this;};
 		public M tbpiHeadNotNull(){if(proxy)return proxy().tbpiHeadNotNull();this.put("tbpiHeadNot", "not");this.put("tbpiHead", null);return this;};
 		public M tbpiHeadNot(Object tbpiHead){if(proxy)return proxy().tbpiHeadNot(tbpiHead);this.put("tbpiHeadNot", "not");this.put("tbpiHead", tbpiHead);return this;};
	 		
			
		
			
	 	
			
		
		/** 下单人昵称        **/
		public M tbpiNickname(Object tbpiNickname){if(proxy)return proxy().tbpiNickname(tbpiNickname);  this.put("tbpiNickname", tbpiNickname);return this;};
	 	/** and tbpi_nickname is null */
 		public M tbpiNicknameNull(){if(proxy)return proxy().tbpiNicknameNull();if(this.get("tbpiNicknameNot")==null)this.put("tbpiNicknameNot", "");this.put("tbpiNickname", null);return this;};
 		/** not .... */
 		public M tbpiNicknameNot(){if(proxy)return proxy().tbpiNicknameNot();this.put("tbpiNicknameNot", "not");return this;};
 		public M tbpiNicknameNotNull(){if(proxy)return proxy().tbpiNicknameNotNull();this.put("tbpiNicknameNot", "not");this.put("tbpiNickname", null);return this;};
 		public M tbpiNicknameNot(Object tbpiNickname){if(proxy)return proxy().tbpiNicknameNot(tbpiNickname);this.put("tbpiNicknameNot", "not");this.put("tbpiNickname", tbpiNickname);return this;};
	 		
			
		
			
	 	
			
		
		/** 街道        **/
		public M tbpiStreet(Object tbpiStreet){if(proxy)return proxy().tbpiStreet(tbpiStreet);  this.put("tbpiStreet", tbpiStreet);return this;};
	 	/** and tbpi_street is null */
 		public M tbpiStreetNull(){if(proxy)return proxy().tbpiStreetNull();if(this.get("tbpiStreetNot")==null)this.put("tbpiStreetNot", "");this.put("tbpiStreet", null);return this;};
 		/** not .... */
 		public M tbpiStreetNot(){if(proxy)return proxy().tbpiStreetNot();this.put("tbpiStreetNot", "not");return this;};
 		public M tbpiStreetNotNull(){if(proxy)return proxy().tbpiStreetNotNull();this.put("tbpiStreetNot", "not");this.put("tbpiStreet", null);return this;};
 		public M tbpiStreetNot(Object tbpiStreet){if(proxy)return proxy().tbpiStreetNot(tbpiStreet);this.put("tbpiStreetNot", "not");this.put("tbpiStreet", tbpiStreet);return this;};
	 		
			
		
			
	 	
			
		
		/** 省市区        **/
		public M tbpiCity(Object tbpiCity){if(proxy)return proxy().tbpiCity(tbpiCity);  this.put("tbpiCity", tbpiCity);return this;};
	 	/** and tbpi_city is null */
 		public M tbpiCityNull(){if(proxy)return proxy().tbpiCityNull();if(this.get("tbpiCityNot")==null)this.put("tbpiCityNot", "");this.put("tbpiCity", null);return this;};
 		/** not .... */
 		public M tbpiCityNot(){if(proxy)return proxy().tbpiCityNot();this.put("tbpiCityNot", "not");return this;};
 		public M tbpiCityNotNull(){if(proxy)return proxy().tbpiCityNotNull();this.put("tbpiCityNot", "not");this.put("tbpiCity", null);return this;};
 		public M tbpiCityNot(Object tbpiCity){if(proxy)return proxy().tbpiCityNot(tbpiCity);this.put("tbpiCityNot", "not");this.put("tbpiCity", tbpiCity);return this;};
	 		
			
		
			
	 	
			
		
		/** 下单时间        **/
		public M tbpiOrderTime(Object tbpiOrderTime){if(proxy)return proxy().tbpiOrderTime(tbpiOrderTime);  this.put("tbpiOrderTime", tbpiOrderTime);return this;};
	 	/** and tbpi_order_time is null */
 		public M tbpiOrderTimeNull(){if(proxy)return proxy().tbpiOrderTimeNull();if(this.get("tbpiOrderTimeNot")==null)this.put("tbpiOrderTimeNot", "");this.put("tbpiOrderTime", null);return this;};
 		/** not .... */
 		public M tbpiOrderTimeNot(){if(proxy)return proxy().tbpiOrderTimeNot();this.put("tbpiOrderTimeNot", "not");return this;};
 		public M tbpiOrderTimeNotNull(){if(proxy)return proxy().tbpiOrderTimeNotNull();this.put("tbpiOrderTimeNot", "not");this.put("tbpiOrderTime", null);return this;};
 		public M tbpiOrderTimeNot(Object tbpiOrderTime){if(proxy)return proxy().tbpiOrderTimeNot(tbpiOrderTime);this.put("tbpiOrderTimeNot", "not");this.put("tbpiOrderTime", tbpiOrderTime);return this;};
	 		
 		/** and tbpi_order_time >= ? */
 		public M tbpiOrderTimeStart(Object start){if(proxy)return proxy().tbpiOrderTimeStart(start);this.put("tbpiOrderTimeStart", start);return this;};			
 		/** and tbpi_order_time <= ? */
 		public M tbpiOrderTimeEnd(Object end){if(proxy)return proxy().tbpiOrderTimeEnd(end);this.put("tbpiOrderTimeEnd", end);return this;};
			
			
		
			
	 	
			
		
		/** 收益金额        **/
		public M tbpiMoney(Object tbpiMoney){if(proxy)return proxy().tbpiMoney(tbpiMoney);  this.put("tbpiMoney", tbpiMoney);return this;};
	 	/** and tbpi_money is null */
 		public M tbpiMoneyNull(){if(proxy)return proxy().tbpiMoneyNull();if(this.get("tbpiMoneyNot")==null)this.put("tbpiMoneyNot", "");this.put("tbpiMoney", null);return this;};
 		/** not .... */
 		public M tbpiMoneyNot(){if(proxy)return proxy().tbpiMoneyNot();this.put("tbpiMoneyNot", "not");return this;};
 		public M tbpiMoneyNotNull(){if(proxy)return proxy().tbpiMoneyNotNull();this.put("tbpiMoneyNot", "not");this.put("tbpiMoney", null);return this;};
 		public M tbpiMoneyNot(Object tbpiMoney){if(proxy)return proxy().tbpiMoneyNot(tbpiMoney);this.put("tbpiMoneyNot", "not");this.put("tbpiMoney", tbpiMoney);return this;};
	 		
		/** and tbpi_money <= ? */
		public M tbpiMoneyMin(Object min){if(proxy)return proxy().tbpiMoneyMin(min);this.put("tbpiMoneyMin", min);return this;};
		/** and tbpi_money >= ? */
		public M tbpiMoneyMax(Object max){if(proxy)return proxy().tbpiMoneyMax(max);this.put("tbpiMoneyMax", max);return this;};
			
			
		
			
	 	
	 	public M add(String key, Object value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	 	public M add(F key, Object value) {if(proxy)return proxy().add(key,value);this.put(key.toString(), value);return this;}
	 	
	 	public M desc(C key) {if(proxy)return proxy().desc(key);this.put("desc", key.column);return this;}
	 	public M asc(C key) {if(proxy)return proxy().asc(key);this.put("asc", key.column);return this;}
	 	public M desc(String sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	 	public M asc(String sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	 	public M definex(String sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	 	
	 	/** 获取所有合伙人收益 **/
		public @api List<TbPartnerIncome> list(Integer size){			
			return getTbPartnerIncomeList(this,size);
		}
		/** 获取合伙人收益分页 **/
		public @api Page<TbPartnerIncome> page(Integer page,Integer size){			
			return getTbPartnerIncomePage(page, size , this);
		}
		/** 根据查询条件取合伙人收益 **/
		public @api TbPartnerIncome get(){			
			return getTbPartnerIncome(this);
		}
		/** 获取合伙人收益数 **/
		public @api Long count(){			
			return getTbPartnerIncomeCount(this);
		}
		/** 获取合伙人收益表达式 **/
		public @api <T> T eval(String strEval){			
			return getTbPartnerIncomeEval(strEval,this);
		}
		
		/** 获取合伙人收益统计 **/
		public @api List<Map> stats(C sumKey,C groupKey,int dateType){			
			return getTbPartnerIncomeStats(this,sumKey,groupKey,dateType);
		}
		/** 获取合伙人收益统计 **/
		public @api List<Map> stats(C sumKey,C groupKey){			
			return getTbPartnerIncomeStats(this,sumKey,groupKey,-1);
		}
		
		/** 根据条件更新 **/
		public @api int update(){			
			M where = null;
			M set = null;
			if(this.type==0){
				if(this.linked==null)throw new RuntimeException("未发set");
				where = this;
				set = this.linked;
			}else{
				if(this.linked==null)throw new RuntimeException("未发where条件");
				set = this;
				where = this.linked;
			}
			return updateTbPartnerIncome(set,where);
		}
		/** 根据条件删除 **/
		public @api void delete(){			
			deleteTbPartnerIncome(this);
		}
	}
	
	public static class Param extends M{
		public Param(int type) {
			super(type);
		}
		public Param(int type, Boolean proxy) {
			super(type, proxy);
		}
	}
	
	/** 对象的字段描述 **/
	public static class F{
		
			
		/** 编号 [非空]       **/
		public final static @type(Long.class)  String tbpiId="tbpiId";
	 			
			
	 	
			
		/** 品牌  [Merchant]      **/
		public final static @type(Long.class)  String tbpiBrand="tbpiBrand";
	 			
			
	 	
			
		/** 会员名称        **/
		public final static @type(String.class) @like String nickName="nickName";
	 			
			
	 	
			
		/** 会员  [Member]      **/
		public final static @type(Long.class)  String tbpiMember="tbpiMember";
	 			
			
	 	
			
		/** 订单号        **/
		public final static @type(String.class) @like String tbpiOrderNo="tbpiOrderNo";
	 			
			
	 	
			
		/** 订单类型    1:直接购买 2:余额提货订单     **/
		public final static @type(Short.class)  String tbpiOrderType="tbpiOrderType";
	 			
			
	 	
			
		/** 合伙人昵称        **/
		public final static @type(String.class) @like String tbpiPartnerNickname="tbpiPartnerNickname";
	 			
			
	 	
			
		/** 下单人头像        **/
		public final static @type(String.class)  String tbpiHead="tbpiHead";
	 			
			
	 	
			
		/** 下单人昵称        **/
		public final static @type(String.class) @like String tbpiNickname="tbpiNickname";
	 			
			
	 	
			
		/** 街道        **/
		public final static @type(String.class) @like String tbpiStreet="tbpiStreet";
	 			
			
	 	
			
		/** 省市区        **/
		public final static @type(String.class) @like String tbpiCity="tbpiCity";
	 			
			
	 	
			
		/** 下单时间        **/
		public final static @type(Date.class)  String tbpiOrderTime="tbpiOrderTime";
	 			
	 	/** and tbpi_order_time >= ? */
 		public final static @type(Date.class) String tbpiOrderTimeStart="tbpiOrderTimeStart";
 		/** and tbpi_order_time <= ? */
 		public final static @type(Date.class) String tbpiOrderTimeEnd="tbpiOrderTimeEnd";
				
			
	 	
			
		/** 收益金额        **/
		public final static @type(Double.class)  String tbpiMoney="tbpiMoney";
	 			
		/** and tbpi_money >= ? */
		public final static @type(Double.class) String tbpiMoneyMin="tbpiMoneyMin";
		/** and tbpi_money <= ? */
		public final static @type(Double.class) String tbpiMoneyMax="tbpiMoneyMax";
				
			
	 	
	 	public static String get(String name){
			try {
				Field field = F.class.getField(name);
				if(field!=null)
					return field.get(null).toString();
			} catch (Exception e) {
				//e.printStackTrace();
			}
			return null;
		}
	}
	
	
	
	/** 对象的数据库字段描述 **/
	public static enum C{
		
		tbpiId("tbpi_id"),
		tbpiBrand("tbpi_brand"),
		nickName("nick_name"),
		tbpiMember("tbpi_member"),
		tbpiOrderNo("tbpi_order_no"),
		tbpiOrderType("tbpi_order_type"),
		tbpiPartnerNickname("tbpi_partner_nickname"),
		tbpiHead("tbpi_head"),
		tbpiNickname("tbpi_nickname"),
		tbpiStreet("tbpi_street"),
		tbpiCity("tbpi_city"),
		tbpiOrderTime("tbpi_order_time"),
		tbpiMoney("tbpi_money"),
		count("count");
		String column;
		C(String column){
			this.column = column;
		}
		public String toString(){
			return this.column;
		}
		public static String get(String name){
			try {
				Field field = C.class.getField(name);
				if(field!=null)
					return field.get(null).toString();
			} catch (Exception e) {
				//e.printStackTrace();
			}
			return null;
		}
	}
	
	
	
	
	/**
	* 获取合伙人收益数据
	**/
	public static Object getData(Object param){
		if(param==null)
			return null;
		Object value = null;
		if(param.getClass()==Long.class)
			value = TbPartnerIncome.get((Long)param);
		else if(param instanceof java.util.Map){
			java.util.Map params = (Map) param;
			if(params.get("size")==null)
				value = TbPartnerIncome.getTbPartnerIncome(params);
			else
				value = TbPartnerIncome.getTbPartnerIncomeList(params, (Integer) params.get("size"));
		}else if(param.getClass()==Long.class )
			value =  TbPartnerIncome.where().tbpiId(param).get();
		else if(!Utils.empty(param.toString()))
			value = TbPartnerIncome.get(Long.valueOf(param.toString()));
		return value;
	}
	
	/**对象转json**/
	public Map toJSON(){
		return toJSON(false);
	}
	public Map toJSON(boolean simple){
		return toJSON(simple,0);
	}
	public Map toJSON(boolean simple,int step){
		Map map = new HashMap();
		map.put("id",this.getTbpiId());
	
		Utils.fms(map,simple?"id":"tbpiId",this.getTbpiId(),this.getTbpiId$());
		
			
 		
	
		Utils.fms(map,simple?"brand":"tbpiBrand",this.getTbpiBrand(),this.getTbpiBrand$());
		
			
 		
	
		Utils.fms(map,simple?"name":"nickName",this.getNickName(),this.getNickName$());
		
			
 		
	
		Utils.fms(map,simple?"member":"tbpiMember",this.getTbpiMember(),this.getTbpiMember$());
		
			
 		
	
		Utils.fms(map,simple?"orderNo":"tbpiOrderNo",this.getTbpiOrderNo(),this.getTbpiOrderNo$());
		
			
 		
	
		Utils.fms(map,simple?"orderType":"tbpiOrderType",this.getTbpiOrderType(),this.getTbpiOrderType$());
		
			
 		
	
		Utils.fms(map,simple?"partnerNickname":"tbpiPartnerNickname",this.getTbpiPartnerNickname(),this.getTbpiPartnerNickname$());
		
			
 		
	
		Utils.fms(map,simple?"head":"tbpiHead",this.getTbpiHead(),this.getTbpiHead$());
		
			
 		
	
		Utils.fms(map,simple?"nickname":"tbpiNickname",this.getTbpiNickname(),this.getTbpiNickname$());
		
			
 		
	
		Utils.fms(map,simple?"street":"tbpiStreet",this.getTbpiStreet(),this.getTbpiStreet$());
		
			
 		
	
		Utils.fms(map,simple?"city":"tbpiCity",this.getTbpiCity(),this.getTbpiCity$());
		
			
 		
	
		Utils.fms(map,simple?"orderTime":"tbpiOrderTime",this.getTbpiOrderTime(),this.getTbpiOrderTime$());
		
			
 		
	
		Utils.fms(map,simple?"money":"tbpiMoney",this.getTbpiMoney(),this.getTbpiMoney$());
		
			
 		
	
		if(this.suffix!=null)map.put("suffix", this.suffix);
		
		/************LAZY3Q_DEFINE_TOJSON************/
		/************LAZY3Q_DEFINE_TOJSON************/
		return map;
	}
	/**对象转map**/
	public Map toMap(){
		Map map = new HashMap();
	
		map.put("tbpiId",this.getTbpiId());
 		
	
		map.put("tbpiBrand",this.getTbpiBrand());
 		
	
		map.put("nickName",this.getNickName());
 		
	
		map.put("tbpiMember",this.getTbpiMember());
 		
	
		map.put("tbpiOrderNo",this.getTbpiOrderNo());
 		
	
		map.put("tbpiOrderType",this.getTbpiOrderType());
 		
	
		map.put("tbpiPartnerNickname",this.getTbpiPartnerNickname());
 		
	
		map.put("tbpiHead",this.getTbpiHead());
 		
	
		map.put("tbpiNickname",this.getTbpiNickname());
 		
	
		map.put("tbpiStreet",this.getTbpiStreet());
 		
	
		map.put("tbpiCity",this.getTbpiCity());
 		
	
		map.put("tbpiOrderTime",this.getTbpiOrderTime());
 		
	
		map.put("tbpiMoney",this.getTbpiMoney());
 		
	
		map.put("suffix", this.suffix);
		
		/************LAZY3Q_DEFINE_TOMAP************/
		/************LAZY3Q_DEFINE_TOMAP************/
		return map;
	}
	/**map转对象**/
	public static TbPartnerIncome fromMap(Map map){
		TbPartnerIncome tbPartnerIncome = new TbPartnerIncome();
	
		tbPartnerIncome.tbpiId = Utils.parseLong(map.get("tbpiId"));
 		
	
		tbPartnerIncome.tbpiBrand = Utils.parseLong(map.get("tbpiBrand"));
 		
	
	
		tbPartnerIncome.tbpiMember = Utils.parseLong(map.get("tbpiMember"));
 		
	
		tbPartnerIncome.tbpiOrderNo = Utils.parseString(map.get("tbpiOrderNo"));
 		
	
		tbPartnerIncome.tbpiOrderType = Utils.parseShort(map.get("tbpiOrderType"));
 		
	
		tbPartnerIncome.tbpiPartnerNickname = Utils.parseString(map.get("tbpiPartnerNickname"));
 		
	
		tbPartnerIncome.tbpiHead = Utils.parseString(map.get("tbpiHead"));
 		
	
		tbPartnerIncome.tbpiNickname = Utils.parseString(map.get("tbpiNickname"));
 		
	
		tbPartnerIncome.tbpiStreet = Utils.parseString(map.get("tbpiStreet"));
 		
	
		tbPartnerIncome.tbpiCity = Utils.parseString(map.get("tbpiCity"));
 		
	
		tbPartnerIncome.tbpiOrderTime = Utils.parseDate(map.get("tbpiOrderTime"));
 		
	
		tbPartnerIncome.tbpiMoney = Utils.parseDouble(map.get("tbpiMoney"));
 		
	
		return tbPartnerIncome;
	}
	
	
	/**字段设置标记队列**/
	private Map<String,Boolean> seted=new HashMap();
	public Boolean getSeted(String key){
		return seted.get(key);
	}
	public void setSeted(String key){
		seted.put(key,true);
	}
	/**同步未set的字段**/
	public void mergeSet(TbPartnerIncome old){
		Field[] fields = this.getClass().getDeclaredFields();
		try {
			for(Field field:fields){
				String key = field.getName();
				if(seted.get(key)==null && field.getAnnotation(column.class)!=null){
					field.setAccessible(true);
					field.set(this, field.get(old));					
				}
			}
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	
		
	/**自定义变量存储**/
	private Map values=new HashMap();
	public Map getValues(){
		return values;
	}
	public void setValues(String name,Object value){
		values.put(name,value);
	}
	
	/**分表时的表名后缀**/
	private String suffix;
	public String getSuffix() {
		return suffix;
	}
	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}
	
	
	/**获取数据库名称**/
	public static String getDataBaseName(){
		return Utils.config("spring.datasource.distribute_sys.name");
	}
	
	
	public static String getIcon(){
		return "/images/icons/20088256422923477806.png";
	}
	public static String getIconfont(){
		return "icon-jiagebaohu";
	}
	public static enum ACT{
		列表,添加,修改,详情
	};
	public static String getUrl(ACT act,TbPartnerIncome.M params){
		if(params==null)params=new TbPartnerIncome.M(0);
		params.remove("joins");
		params.remove("definexs");
		params.remove("distinct");
		String strUrl = "/admin/partner/income.edit.html?";
		if(params.get("tbpiId")!=null){
			strUrl+="&id="+Utils.encode(""+params.get("tbpiId"),Utils.UTF8);
		}
		if(act==ACT.列表){
			strUrl = "/admin/partner/income.html?1=1";
		
		}else if(act==ACT.添加){
			strUrl+="&edittype=insert";
		
		
		}else if(act==ACT.修改){
			strUrl+="&edittype=update";
		
		}else if(act==ACT.详情){
			strUrl+="&edittype=detail";
		
		}		
		if(params!=null){
			for(Object key:params.keySet()){
				strUrl+="&"+key+"="+Utils.encode(""+params.get(key),Utils.UTF8)+"";
			}
		}
		return strUrl;
	}
	public String getDetailUrl(){
		return this.getUrl(ACT.详情, where.tbpiId(this.getId()));
	}
	
	/**
	* 转跳到当前地址
	**/
	public static Protocol redirect(TbPartnerIncome.ACT act,TbPartnerIncome.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_REDIRECT");
		protocol.set("url",TbPartnerIncome.getUrl(act, params));
		return protocol;
	}
	/**
	* 打开一个新的tab页面
	**/
	public static Protocol href(TbPartnerIncome.ACT act,TbPartnerIncome.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_HREF");
		protocol.set("url",TbPartnerIncome.getUrl(act, params));
		protocol.set("title",act.name());
		return protocol;
	}
	/**
	* 显示一个消息框，并且关闭当前的对话框
	**/
	public static Protocol message(String message){
		Protocol protocol = Protocol.create(true,null,"ACT_MESSAGE");
		protocol.set("message",message);
		return protocol;
	}
	
	
	static com.distribute.framework.dao.ITbPartnerIncomeDao getTbPartnerIncomeDao(){
		return Utils.getBean("tbPartnerIncomeDao");
	};
	
}